package com.jingbian.cppccbackend.service.admin;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jingbian.cppccbackend.entity.PublicOpinions;
import com.jingbian.cppccbackend.entity.vo.PageVO;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 社情民意信息表 服务类
 * </p>
 *
 * @author yezi
 * @since 2025-04-26
 */
public interface adminPublicOpinionsService extends IService<PublicOpinions> {

    /**
     * 查询某个社情民意的详情
     * @param opinionId 社情民意ID
     * @return PublicOpinions
     */
    PublicOpinions getPublicOpinionById(Integer opinionId);

    /**
     * 【管理员】获取所有社情民意数据及其关联的附件和联名人信息
     */
    PageVO<PublicOpinions> getAllPublicOpinionsWithDetails(Integer pageNum, Integer pageSize, String status, 
            String opinionType, String startDate, String endDate, String sort, String department, 
            String searchText, Integer pageStatus);

    /**
     * 【管理员】修改社情民意状态
     */
    void updatePublicOpinionStatus(Integer opinionId, String status, Boolean isOr, Integer pageStatus, 
            String department, String handing_result, List<String> filePaths, String fileName, String size);

    /**
     * 退回
     */
    void senBack(Integer opinionId, String status, Boolean isOr, Integer pageStatus, String department);

    /**
     * 【管理员】根据搜索文本搜索社情民意
     */
    List<PublicOpinions> searchPublicOpinions(String searchText);

    /**
     * 获取社情民意统计数据
     */
    Map<String, Object> getPublicOpinionStatistics();

    /**
     * 获取社情民意类型分布数据
     */
    List<Map<String, Object>> getPublicOpinionTypeDistribution();

    /**
     * 获取社情民意提交趋势数据
     */
    List<Map<String, Object>> getPublicOpinionTrend(String startDate, String endDate);

    /**
     * 公示
     */
    void publicity(Integer opinionId, String status, Boolean isOr);

    /**
     * 获取社情民意导出列表数据
     */
    List<PublicOpinions> getPublicOpinionsExportList(String status, String opinionType, String startDate, 
            String endDate, String sort, String department, String searchText, Integer pageStatus);
}
